import router from "../router"
import $bus from "../utils/bus"



router.beforeEach((to,from)=>{
    let token = sessionStorage.getItem("qf-token")
   if(!token){
       if (to.path !== "/login") {
           return {
               path: "/login"
           }
       }
   }
})

router.afterEach((to, from) => {
    $bus.$emit('breadChange', to.matched)
})